package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.booking;
import com.zzyl.vo.BookingVo;
import com.zzyl.vo.bookingCountVo;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface bookingMapper {
    Integer getCountData(Long userId);

    void insertBooking(booking booking);

    Page<BookingVo> getPage(Integer status,Long userId);

    void deleteBooking(Long id);


    List<bookingCountVo> getCount(List<String> times);

    Integer getUserdil(Long userId);

    booking findByid(Long id);

    void updateBooking(booking booking);

    List<bookingCountVo> getCountVo(LocalDateTime startTime, LocalDateTime endTime);

    List<booking> getTodayBooking(LocalDateTime startOfDay, LocalDateTime endOfDay);

    void updateStatus(List<booking> expiredBookings);
}
